{% extends "base_content.html" %}
<!-- template about.html -->
{% load i18n %}
{% load extra_tags %}
{% load humanize %}
{% block title %}{% spaceless %}{% trans "Feedback" %}{% endspaceless %}{% endblock %}
{% block forejs %}
{% endblock %}
{% block content %}
<div class="headNormal">
{% trans "Give us your feedback!" %}
</div>
<div class="content">
    <form method="post" action="{% url "feedback" %}" accept-charset="utf-8">
        {% csrf_token %}
        {% if user.is_authenticated %}
            <p class="message">
            {% blocktrans with user.username as user_name %}
            <span class='big strong'>Dear {{user_name}}</span>, we look forward to hearing your feedback. 
            Please type and send us your message below.
            {% endblocktrans %}
            <p>
        {% else %}
            <p class="message">
            {% blocktrans %}
            <span class='big strong'>Dear visitor</span>, we look forward to hearing your feedback.
            Please type and send us your message below.
            {% endblocktrans %}
            </p>
            <div class="form-row"><label for="id_name">{{form.name.label}}</label><br/>{{form.name}}</div>
            <div class="form-row">
                <label for="id_email">{{form.email.label}}
                    {% if form.errors.email %}
                        <strong>(please enter a valid email)</strong>
                    {% endif %}
                </label><br/>{{form.email}}
            </div>
        {% endif %}
        <div class="form-row">
            <label for="id_message">{{form.message.label}}
            {% if form.errors.message %}
            <strong>{% trans "(this field is required)" %}</strong>
            {% endif %}
            </label>
            <br/>
            {{form.message}}
        </div>

        {% if form.recaptcha %}
        <div class="form-row">
            <label for="recaptcha_response_field">Are you a human?
            {% if form.errors.recaptcha %}
            <strong>{% trans "(wrong captcha)" %}</strong>
            {% endif %}
            </label>
            <br/>
            <div style="float: left;">
            {{ form.recaptcha }}
            </div>
            <div class="clear"></div>
        </div>
        {% endif %}

        {{form.next}}
        <div class="submit-row">
            <input type="submit" class="submit" value="{% trans "Send Feedback" %}"/>
            <input type="submit" class="submit" name="cancel" value="{% trans "Cancel" %}"/>
        </div>
    </form>
</div>
{% endblock %}
<!-- end template about.html -->
